package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lvy.hczn.front.common.annotation.Excel;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 货箱管理
 *
 * @author yw
 * @date 2022-04-01 11:55:41
 **/
@Data
@TableName("goods_box")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "货箱管理")
public class GoodsBox extends BaseModel<GoodsBox> {

    @ApiModelProperty("货箱编号")
    @Excel(name = "货箱编号", type = Excel.Type.IMPORT)
    private String boxCode;

    @ApiModelProperty("前置仓ID")
    @NotNull(message = "仓库为空")
    private String warehouseId;

    @ApiModelProperty("适合温区")
    private Integer temperatureZoneCode;

    @ApiModelProperty("实际存储温区")
    private String actTemperatureCode;

    @ApiModelProperty("前置仓里的仓库号")
    private Integer warehouseNumber;

    @ApiModelProperty("前置仓里的行号")
    private Integer warehouseRow;

    @ApiModelProperty("前置仓里的列号")
    private Integer warehouseColumn;

    @ApiModelProperty("货箱类型 0空箱，1采购入库（原料箱），2分拣原料入库（不需要状态2，可删），3分拣订单入库, 4货箱入库, 5销售退货入库，6：调拨配送入库")
    private String boxType;

    @ApiModelProperty("状态 0正在上架，1正在下架，2已下架，3已上架, 4异常货箱,5、称重，6.调拨在途")
    private String status;

    @ApiModelProperty("出库单编号")
    private String outboundOrderCode;

    @ApiModelProperty("出库顺序")
    private Integer outSortNumber;

    @ApiModelProperty("物品重量")
    private BigDecimal weight;

    @ApiModelProperty("入库时间")
    private LocalDateTime warehousingEntryTime;

    @ApiModelProperty("出库时间")
    private LocalDateTime outboundTime;

    @ApiModelProperty("(检视类型：0:抽检，1:全检)")
    @NotBlank(message = "检视类型为空")
    private String inspectType;

    @ApiModelProperty("货箱标准重量（默认一个标准值，称重后，没有超过误差范围，则以称重结果为货箱重量）")
    @Excel(name = "货箱重量", type = Excel.Type.IMPORT)
    private BigDecimal boxStandardWeight;

    @ApiModelProperty("货箱能容纳的体积（立方毫米）")
    private BigDecimal volume;

    @ApiModelProperty("货箱重量误差范围最小值")
    private BigDecimal errorMin;

    @ApiModelProperty("货箱重量误差范围最大值")
    private BigDecimal errorMax;

    @ApiModelProperty("货箱大小:0:大货箱，1:小货箱")
    private int type;

    @ApiModelProperty(value = "货箱类型id")
    private String goodsBoxSpecId;

    @ApiModelProperty(value = "是否整箱分拣出库 0：否  1：是")
    private boolean fullGoodsBox;


    @ApiModelProperty(value = "货箱详情")
    @TableField(exist = false)
    private List<GoodsBoxDetail> detailList;

    @ApiModelProperty(value = "温区名称")
    @TableField(exist = false)
    private String temperatureName;

    @ApiModelProperty(value = "仓库编码")
    @TableField(exist = false)
    private String warehouseCode;

    @ApiModelProperty(value = "合箱查询条件，仓库编号")
    @TableField(exist = false)
    private String clientId;

    @ApiModelProperty(value = "合箱查询条件，取的默认箱数")
    @TableField(exist = false)
    private Integer boxNumber;

    @ApiModelProperty(value = "大件商品，移到货架需要")
    @TableField(exist = false)
    private String ids;

    @ApiModelProperty(value = "是否内部入库，false:否，true:是，比如，地平仓迁到货架，属于内部入库")
    @TableField(exist = false)
    private boolean intStorage;
}